package 排序;

public class Student implements Comparable<Student>{
	private int score;
	private int age;
	
	public Student(int score, int age) {
		this.score = score;
		this.age = age;
	}

	@Override
	public int compareTo(Student o) {
		return age - o.age;
	}
	
	public int getScore() {
		return score;
	}
	
	@Override
	public String toString() {
		return "Student [score=" + score + ", age=" + age + "]";
	}
	
	
}
